﻿using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Security.Claims;
using System.Text;

namespace AppSocketService
{
    public class PrincipalAccessor : IPrincipalAccessor
    {
        public ClaimsPrincipal principal => httpContextAccessor.HttpContext?.User;

        private readonly IHttpContextAccessor httpContextAccessor;

        public PrincipalAccessor(IHttpContextAccessor httpContextAccessor)
        {
            this.httpContextAccessor = httpContextAccessor;
        }

    }
}
